package com.chenyao.curtain.topic.receive;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
public class ReceiveTopic {
	// 接收者A
	@RabbitListener(queues = "topic.a")
	public void processA(String message) {
		System.out.println(String.format("receive topic A message: %s", message));
	}


	// 接收者Any
	@RabbitListener(queues = "topic.any")
	public void processAny(String message) {
	    System.out.println(String.format("receive topic any message: %s", message));
	}

}